webpackJsonp([5],{

/***/ 321:
/***/ (function(module, exports, __webpack_require__) {

var disposed = false
var normalizeComponent = __webpack_require__(8)
/* script */
var __vue_script__ = __webpack_require__(343)
/* template */
var __vue_template__ = __webpack_require__(344)
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __vue_script__,
  __vue_template__,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)
Component.options.__file = "resources\\assets\\js\\pages\\EnrollSituationList.vue"

/* hot reload */
if (false) {(function () {
  var hotAPI = require("vue-hot-reload-api")
  hotAPI.install(require("vue"), false)
  if (!hotAPI.compatible) return
  module.hot.accept()
  if (!module.hot.data) {
    hotAPI.createRecord("data-v-02e2dbe2", Component.options)
  } else {
    hotAPI.reload("data-v-02e2dbe2", Component.options)
  }
  module.hot.dispose(function (data) {
    disposed = true
  })
})()}

module.exports = Component.exports


/***/ }),

/***/ 330:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = {
  getPrintOut: function getPrintOut(id) {
    //打印页
    return axios.get('/api/print-info/' + id);
  },
  setlog: function setlog(id) {
    //打印页打印log
    return axios.get('/api/print-log/' + id);
  },
  getEnrollSituation: function getEnrollSituation() {
    //获取学校招生情况
    return axios.get('/api/situation-info');
  },
  getExportInfo: function getExportInfo(school_id) {
    //导出excl表
    return axios.get('/api/export/school_id=' + school_id);
  },
  postImportInfo: function postImportInfo(file) {
    //导入excl表
    return axios.post('/api/import', file, { headers: { 'Content-Type': 'multipart/form-data' } });
  },
  postSchoolUpperLimit: function postSchoolUpperLimit(id, upperLimit) {
    //重设幼儿园预计招生数
    return axios.post('/api/update-upper-limit/' + id, upperLimit);
  },

  // getDeleteStudent(id){// 删除报名学生
  //   return axios.get('/api/' + id)
  // },
  getEnrollAll: function getEnrollAll(id) {
    //录取所有学生
    return axios.get('/api/all-enroll/' + id);
  },
  getStudentInfo: function getStudentInfo(id) {
    //录入页面
    return axios.get('/api/sign-up/' + id);
  },
  getPolice: function getPolice(id) {
    //录入页面根据幼儿园code获取派出所
    return axios.get('/api/police/' + id);
  },
  postStudent: function postStudent(model) {
    return axios.post('/api/sign-up', model);
  },
  putStudent: function putStudent(uuid, model) {
    return axios.put('/api/sign-up/' + uuid, model);
  }
};

/***/ }),

/***/ 331:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;

var _isIterable2 = __webpack_require__(332);

var _isIterable3 = _interopRequireDefault(_isIterable2);

var _getIterator2 = __webpack_require__(335);

var _getIterator3 = _interopRequireDefault(_getIterator2);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function () {
  function sliceIterator(arr, i) {
    var _arr = [];
    var _n = true;
    var _d = false;
    var _e = undefined;

    try {
      for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
        _arr.push(_s.value);

        if (i && _arr.length === i) break;
      }
    } catch (err) {
      _d = true;
      _e = err;
    } finally {
      try {
        if (!_n && _i["return"]) _i["return"]();
      } finally {
        if (_d) throw _e;
      }
    }

    return _arr;
  }

  return function (arr, i) {
    if (Array.isArray(arr)) {
      return arr;
    } else if ((0, _isIterable3.default)(Object(arr))) {
      return sliceIterator(arr, i);
    } else {
      throw new TypeError("Invalid attempt to destructure non-iterable instance");
    }
  };
}();

/***/ }),

/***/ 332:
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(333), __esModule: true };

/***/ }),

/***/ 333:
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(71);
__webpack_require__(70);
module.exports = __webpack_require__(334);


/***/ }),

/***/ 334:
/***/ (function(module, exports, __webpack_require__) {

var classof = __webpack_require__(73);
var ITERATOR = __webpack_require__(5)('iterator');
var Iterators = __webpack_require__(27);
module.exports = __webpack_require__(7).isIterable = function (it) {
  var O = Object(it);
  return O[ITERATOR] !== undefined
    || '@@iterator' in O
    // eslint-disable-next-line no-prototype-builtins
    || Iterators.hasOwnProperty(classof(O));
};


/***/ }),

/***/ 335:
/***/ (function(module, exports, __webpack_require__) {

module.exports = { "default": __webpack_require__(336), __esModule: true };

/***/ }),

/***/ 336:
/***/ (function(module, exports, __webpack_require__) {

__webpack_require__(71);
__webpack_require__(70);
module.exports = __webpack_require__(337);


/***/ }),

/***/ 337:
/***/ (function(module, exports, __webpack_require__) {

var anObject = __webpack_require__(12);
var get = __webpack_require__(125);
module.exports = __webpack_require__(7).getIterator = function (it) {
  var iterFn = get(it);
  if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  return anObject(iterFn.call(it));
};


/***/ }),

/***/ 343:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

var _slicedToArray2 = __webpack_require__(331);

var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);

var _promise = __webpack_require__(124);

var _promise2 = _interopRequireDefault(_promise);

var _ListDataSource = __webpack_require__(123);

var _ListDataSource2 = _interopRequireDefault(_ListDataSource);

var _data = __webpack_require__(330);

var _data2 = _interopRequireDefault(_data);

var _jsCookie = __webpack_require__(72);

var _jsCookie2 = _interopRequireDefault(_jsCookie);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = {
  data: function data() {
    return {
      tableList: new _ListDataSource2.default('/api/situation-info'),
      queryModel: {},
      newModel: {
        upperLimit: null
      },
      DialogVisible: false,
      ruleValidate: {
        upperLimit: [{ required: true, message: '预计招生不能为空', trigger: 'blur' }]
      },
      title: '',
      newId: null,
      refreshList: true,
      isImport: false
    };
  },
  created: function created() {
    var vm = this;
    this.isLoading = true;
    _promise2.default.all([vm.tableList.fetchData()]).then(function (_ref) {
      var _ref2 = (0, _slicedToArray3.default)(_ref, 1),
          Response = _ref2[0];

      vm.isLoading = false;
    }).catch(function (error) {
      vm.isLoading = false;
    });
  },

  methods: {
    showDialog: function showDialog() {},
    update: function update(id, schoolName) {
      this.DialogVisible = true;
      this.title = schoolName;
      this.newId = id;
    },
    enrollStudent: function enrollStudent() {
      this.$router.push({
        name: 'entering',
        params: {
          user_id: 0
        }
      });
    },
    toAllList: function toAllList(school) {
      this.$router.push({
        path: 'all-list/' + school
      });
    },
    toResult: function toResult(school) {
      this.$router.push({
        path: 'student-enroll/' + school
      });
    },
    enrollAll: function enrollAll(id) {
      var self = this;
      this.$confirm('此操作将录取全部学生,一旦确认不可操作, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(function () {
        _data2.default.getEnrollAll(id).then(function (res) {
          self.$message({
            type: 'success',
            message: '录取全部学生成功!'
          });
          self.refreshList = !self.refreshList;
        }).catch(function (err) {
          self.$message({
            type: 'info',
            message: '录取全部学生失败'
          });
        });
      }).catch(function () {
        self.$message({
          type: 'info',
          message: '取消录取全部学生'
        });
      });
    },
    logout: function logout() {
      axios.post('/api/logout', {}).then(function (response) {
        _jsCookie2.default.remove('user');
        window.location.reload();
      }).catch(function (error) {
        console.log(error);
      });
    },
    Dialogsave: function Dialogsave() {
      var self = this;
      console.log(self.newModel);
      self.$refs['newModel'].validate(function (valid) {
        if (valid) {
          console.log('表单验证通过');
          _data2.default.postSchoolUpperLimit(self.newId, self.newModel).then(function (res) {
            self.$message.success('保存成功');
            self.DialogVisible = false;
            self.refreshList = !self.refreshList;
          }).catch(function (err) {
            //              self.$message.error(err.response.data[0])
            console.log(err.response);
          });
        } else {}
      });
    }
  },
  compute: {},
  watch: {
    'refreshList': function refreshList() {
      this.tableList.fetchData();
    }
  }
}; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/***/ }),

/***/ 344:
/***/ (function(module, exports, __webpack_require__) {

var render = function() {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  return _c(
    "div",
    { staticClass: "all-list" },
    [
      _c(
        "el-card",
        { staticClass: "container mt-4" },
        [
          _c(
            "div",
            {
              staticClass: "clearfix",
              attrs: { slot: "header" },
              slot: "header"
            },
            [
              _c("span", [
                _c("span", { staticClass: "card-header-box" }),
                _vm._v("幼儿园管理")
              ]),
              _vm._v(" "),
              _c(
                "a",
                {
                  staticClass: "list-button float-right p-1",
                  attrs: { href: "javascript:;" },
                  on: { click: _vm.logout }
                },
                [_vm._v("登出")]
              )
            ]
          ),
          _vm._v(" "),
          _c(
            "vue-table",
            {
              attrs: {
                "data-source": _vm.tableList,
                queryString: _vm.queryModel
              },
              scopedSlots: _vm._u([
                {
                  key: "tbody",
                  fn: function(props) {
                    return [
                      _c(
                        "tr",
                        { class: props.index % 2 == 0 ? "table-row" : "" },
                        [
                          _c("td", [_vm._v(_vm._s(props.item.school_name))]),
                          _vm._v(" "),
                          _c(
                            "td",
                            {
                              class:
                                props.item.registration_numbers >
                                props.item.upper_limit
                                  ? "colorRed"
                                  : "",
                              staticStyle: { cursor: "pointer" },
                              on: {
                                click: function($event) {
                                  _vm.toAllList(props.item.school_code)
                                }
                              }
                            },
                            [_vm._v(_vm._s(props.item.registration_numbers))]
                          ),
                          _vm._v(" "),
                          _c("td", [_vm._v(_vm._s(props.item.upper_limit))]),
                          _vm._v(" "),
                          _c("td", [
                            _c(
                              "a",
                              {
                                attrs: { href: "javascript:;" },
                                on: {
                                  click: function($event) {
                                    _vm.toResult(props.item.school_code)
                                  }
                                }
                              },
                              [_c("span", [_vm._v("录取结果")])]
                            ),
                            _vm._v(" "),
                            props.item.is_import == 0
                              ? _c(
                                  "a",
                                  {
                                    attrs: { href: "javascript:;" },
                                    on: {
                                      click: function($event) {
                                        _vm.enrollAll(props.item.id)
                                      }
                                    }
                                  },
                                  [_c("span", [_vm._v("全部录取")])]
                                )
                              : _vm._e(),
                            _vm._v(" "),
                            _c("a", { attrs: { href: "javascript:;" } }, [
                              _c(
                                "span",
                                {
                                  on: {
                                    click: function($event) {
                                      _vm.update(
                                        props.item.id,
                                        props.item.school_name
                                      )
                                    }
                                  }
                                },
                                [_vm._v("编辑")]
                              )
                            ])
                          ])
                        ]
                      )
                    ]
                  }
                }
              ])
            },
            [
              _c("template", { slot: "header" }, [
                _c("tr", [
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("幼儿园名称")]),
                  _vm._v(" "),
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("已报名人数")]),
                  _vm._v(" "),
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("预计招生")]),
                  _vm._v(" "),
                  _c("th", { attrs: { scope: "col" } }, [_vm._v("操作")])
                ])
              ])
            ],
            2
          )
        ],
        1
      ),
      _vm._v(" "),
      _c(
        "el-dialog",
        {
          attrs: {
            title: _vm.title,
            visible: _vm.DialogVisible,
            width: "30%",
            center: ""
          },
          on: {
            "update:visible": function($event) {
              _vm.DialogVisible = $event
            }
          }
        },
        [
          _c(
            "span",
            [
              _c(
                "el-form",
                {
                  ref: "newModel",
                  staticStyle: { width: "100%" },
                  attrs: {
                    model: _vm.newModel,
                    rules: _vm.ruleValidate,
                    "label-width": "85px"
                  }
                },
                [
                  _c(
                    "el-col",
                    { attrs: { span: 18, offset: 3 } },
                    [
                      _c(
                        "el-form-item",
                        {
                          staticClass: "mb-3",
                          attrs: { label: "预计招生: ", prop: "upperLimit" }
                        },
                        [
                          _c("el-input", {
                            attrs: { placeholder: "请输入新预计招生数" },
                            model: {
                              value: _vm.newModel.upperLimit,
                              callback: function($$v) {
                                _vm.$set(_vm.newModel, "upperLimit", $$v)
                              },
                              expression: "newModel.upperLimit"
                            }
                          })
                        ],
                        1
                      )
                    ],
                    1
                  )
                ],
                1
              )
            ],
            1
          ),
          _vm._v(" "),
          _c(
            "span",
            {
              staticClass: "dialog-footer",
              attrs: { slot: "footer" },
              slot: "footer"
            },
            [
              _c(
                "el-button",
                {
                  on: {
                    click: function($event) {
                      _vm.DialogVisible = false
                    }
                  }
                },
                [_vm._v("取 消")]
              ),
              _vm._v(" "),
              _c(
                "el-button",
                { attrs: { type: "primary" }, on: { click: _vm.Dialogsave } },
                [_vm._v("确 定")]
              )
            ],
            1
          )
        ]
      )
    ],
    1
  )
}
var staticRenderFns = []
render._withStripped = true
module.exports = { render: render, staticRenderFns: staticRenderFns }
if (false) {
  module.hot.accept()
  if (module.hot.data) {
    require("vue-hot-reload-api")      .rerender("data-v-02e2dbe2", module.exports)
  }
}

/***/ })

});